[Contents] [Index] [Help] [Browse <] [Browse >]
dopus command <name> program <scriptname> [desc <description>]
              [template <template>] [source] [dest] [private]
              [help <help file>] [handler] [temp]
              [ext <menu name> type <filetype>] [remove]

This command provides the ability to add new internal commands to Directory
Opus, or to replace existing commands. It is generally called from within
the init function of an Opus ARexx module and the  program  parameter will
be the name of that module, without the ".dopus5" extension.
The  program  field is mandatory, and Opus will run the script name you
provide here whenever this function is invoked.

Use the  name  parameter to specify what the command should be called,
and, optionally, use the  desc  parameter to define a description of
the command which will appear in command lists.

Using the  handler  parameter will allow  the item to be displayed
only if a custom handler matching the  program  parameter is present
for the lister.

The  remove  flag allows you to remove any command specified with  name .

 temp  will allow you to add a 'temporary' command, which does not have
an external command file.  This command will then do nothing unless it is
trapped with the  dopus addtrap  command.  Use the  remove  flag
of the  dopus command  to remove it when you are done.
Using the  private  flag will stop the temporary command from being
seen in the internal command list.

The  template  is not parsed for you in any way -- it is simply shown to the
user when they request a template for your command. It is up to your script
to handle the argument string sent to it.

If you give the  source  or  dest  keyword (or both), your command will not
run unless there is a lister of the given type. When run, the lister will
automatically go busy, and the "source" or "dest" argument given to your
script will contain the lister's handle. (Each argument still exists when
the relevant keyword is not given, but is always "0").

Note that the standard ARexx module example code parses the source lister
handle into a variable called source and the destination handle into
dest. Be careful that when you specify the  source  keyword for
dopus command that you put it in quotes ("source"), otherwise the contents
of the source variable may be used in place of the actual word "source".
Take similar precautions with the "dest" word. 

You can specify a help file for the new command with the  help  parameter.

PopUpExtensions

You can add a command to the pop-up menu of icons of a given type, or to
the lister itself, by specifying a filetype name or ID for the  type 
parameter and the string to appear as the menu item for the  ext  parameter.

To match more than one filetype you can specify the  type  parameter
multiple times (but you can only have one  ext ). You can also specify
one of the following keywords for the  type  parameter:

  all, disk, drawer, tool, project, trash, baddisk, leftout, lister, lister2.

Specifying lister for the  type  parameter will add items to the lister
pop-up menu rather than the icon pop-up menu.

Specifying lister2 for the  type  parameter will add items to
the pop-up menu available from the SRCE/DEST display in the lister status bar.

If you add menus to a filetype at priority -124, they will only be shown
if no other filetype matched. This allows you to have a "default filetype"
with menus that will only be shown if no other filetype menus are
displayed.

Commands which are intended for pop-up menus are unlikely to be of general
use. You can use the  private  keyword to hide the command (it will not
appear in any list shown to the user). (This is not restricted to
PopUpExtensions.)

See  ARexx modules  and the example scripts for more information.


Converted on 04 Nov 1998 with RexxDoesAmigaGuide2HTML 2.2 by Michael Ranner.